package tech.wangpai.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import tech.wangpai.service.TestHttpService;

@RestController
public class TestHttpController {
    @Autowired
    private TestHttpService service;

    @GetMapping(value = "/testRetry",produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public ResponseEntity queryUser(String username) {
        return new ResponseEntity(service.queryUser(username), HttpStatus.OK);
    }
}
